﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AgentReport.aspx.cs" Inherits="ZLCMS.Web.SystemManage.Basics.Shop.Agent.AgentReport" %>

<div class="pageContent">   

<div class="unitBox" style="float:left; display:block; overflow:auto; width:358px;">
<div class="pageHeader" style="border:1px #B8D0D6 solid">


	<div class="searchBar">
		<table class="searchContent" width="100%">
			<tr>
				<td width="300px"><h3>代理结构</h3>
				</td>
			</tr>
		</table>
	</div>
</div>
		
        
<div class="pageContent" style="border:1px #B8D0D6 solid;">



<div class="pageFormContent" layoutH="62">
<ul class="ztree" id="<%=TreeId %>" setting='
{
	view: {
		selectedMulti: false
	},
    data: {
		key: {
			name: "long_name"
		},
		simpleData: {
			enable: true,
			idKey: "Account",
			pIdKey: "Parent"
		},
		keep: {
			parent: false,
			leaf: false
		}
	},
	async: {
		enable: true,
		type: "post",
		url: "/SystemManage/Basics/Shop/Agent/AgentInterface.aspx?opt=load_data",
        otherParam: ["temp", new Date().valueOf()]
	},
    edit: {
		enable: false,
		editNameSelectAll: false,
		showRemoveBtn: true,
		showRenameBtn: false,
		removeTitle: "删除",
		renameTitle: "修改"
	},
	callback: {
		beforeDrag: function (treeId, treeNodes) {
			return false;
		},
        onAsyncSuccess:function(event, treeId, treeNode, msg){
            var ztree = $.fn.zTree.getZTreeObj(treeId);
            var roots = ztree.getNodes();
            if(roots.length>0){
                ztree.expandNode(roots[0],true);
            }
        },
        onClick:function(event, treeId, treeNode, clickFlag){
        var treeObj = $.fn.zTree.getZTreeObj("<%=TreeId %>");
        var nodes = treeObj.getSelectedNodes();
        if (nodes.length > 0) {
            $.get("/SystemManage/Basics/Shop/Agent/<%=Request["page"] %>.aspx" , {cid:"<%=ContentId %>", acc:nodes[0].Account, start: $("#startDate", navTab.getCurrentPanel()).val(), end: $("#endDate", navTab.getCurrentPanel()).val() },
         function (result) {
            $("#agentframe", navTab.getCurrentPanel()).html(result);
            initLayout();
            initUI($("#agentframe", navTab.getCurrentPanel()));
        });
    }
    else {
        alert("请选择代理人");
    }
        }
	}
}
'/>
</div>


</div>
	</div>
	


<div class="unitBox" style="margin-left:360px;">
	<div class="pageHeader" style="border:1px #B8D0D6 solid">
	<div class="searchBar">
		<table class="searchContent">
			<tr>
				<td>
                开始时间
				</td>
                <td><input type="text" class="date" id="startDate" value="<%=string.Format("{0:yyyy-MM-dd}", StartDate) %>"/></td>
				<td>
                结束时间
				</td>
                <td><input type="text" class="date" id="endDate" value="<%=string.Format("{0:yyyy-MM-dd}", EndDate) %>"/></td>
                <td>
                <a class="button" href="javascript:;" onclick="updateAgentFrame()">
                    <span>查询</span>
                </a>
                </td>
			</tr>
		</table>
	</div>
</div>	


<div id="<%=ContentId %>" style="border:1px #B8D0D6 solid;">

<div   id="agentframe" class="pageContent" layoutH="42">
<div align="center" style="margin-top:50px;font-size: xx-large; font-weight: bold; color: #C0C0C0">
请选择代理商
</div>
</div>


</div>

</div>
<%--
<script type="text/javascript">
    function updateAgentFrame() {

        var treeObj = $.fn.zTree.getZTreeObj("<%=TreeId %>");
        var nodes = treeObj.getSelectedNodes();
        if (nodes.length > 0) {
            $.get("/SystemManage/Basics/Shop/Agent/<%=Request["page"] %>.aspx" , {cid:'<%=ContentId %>', acc:nodes[0].Account, start: $("#startDate", navTab.getCurrentPanel()).val(), end: $("#endDate", navTab.getCurrentPanel()).val() },
         function (result) {
            $("#agentframe", navTab.getCurrentPanel()).html(result);
            initLayout();
            initUI($("#agentframe", navTab.getCurrentPanel()));
        });
    }
    else {
        alert("请选择代理人");
    }
}



</script>--%>